import { request } from "@/utils/axios"
/**
 * 获取赛项分组 部分关联的
 */
export function GetGroupsDownApi() {
    return request(
        {
            url: "/institution/getGroupsDown",
            method: "GET",
        }
    );
}

//  赛事 -- 报名管理
/**
 * 获取赛项分页
 */
export function GetEventsApi(params) {
    return request(
        {
            url: "/institution/getEvents",
            method: "GET",
            params: params,
        }
    );
}
/**
 * 获取已参加的赛事列表
 */
export function GetAlreadyEventsListPageApi(params) {
    return request(
        {
            url: "/institution/getAlreadyEventsListPage",
            method: "GET",
            params: params,
        }
    );
}

// ------------- 立即报名 -------------
/**
 * 报名
 */
export function ApplicationApi(params) {
    return request(
        {
            url: "/institution/application",
            method: "PUT",
            params: params,
        }
    );
}

/**
 * 获取未报名的学生分页列表    即报名状态为1的学生  说明学生未进行参赛报名
 */
export function GetNotRegisteredStudentsApi(params) {
    return request(
        {
            url: "/institution/getNotRegisteredStudents",
            method: "GET",
            params: params,
        }
    );
}

/***
 * 准考详情
 */
export function getAdmissionTicket(params) {
    return request(
        {
            url: `/institution/getAdmissionTicket`,
            method: "GET",
            params: params
        }
    );
}

/**
 * 为一个学生绑定指导老师
 */

export function BindingTeacherApi(params) {
    return request(
        {
            url: 'information/bindingTeacher',
            method: "PUT",
            params
        }
    );
}

/**
 * 获取已经报名的学生分页列表 即状态为 2 3 4的学生 说明处于 已报名待审核|已审核待绑定|已绑定
 */
export function GetRegisteredStudentsApi(params) {
    return request(
        {
            url: "/institution/getRegisteredStudents",
            method: "GET",
            params: params,
        }
    );
}

/**
 * 通过赛项id 获取详情
 */
export function GetEventInfoByEventIdApi(params) {
    return request(
        {
            url: "/institution/getEventInfoByEventId",
            method: "GET",
            params: params,
        }
    );
}

/**
 * 撤销报名
 */
export function WithdrawalRegistrationApi(params) {
    return request(
        {
            url: "/agent/withdrawalRegistration",
            method: "PUT",
            params: params,
        }
    );
}

/**
 * 删除指导老师
 */
export function DeleteTeacherApi(params) {
    return request(
        {
            url: "/institution/deleteTeacher",
            method: "DELETE",
            params: params,
        }
    );
}

/**
 * 获取赛项分组
 */
export function GetGroupsApi() {
    return request(
        {
            url: "/institution/getGroups",
            method: "GET",
        }
    );
}

/**
 * 获取组委会负责人基本信息
 */
export function getInformation() {
    return request(
        {
            url: "/information/getInformation",
            method: "GET",
        }
    );
}